import time
import network
from machine import Pin, PWM

pwm8 = PWM(Pin(8))
freq = pwm8.freq()
print("freq:"+str(freq))

pwm8.duty(768)
duty = pwm8.duty()
print("duty:"+str(duty))

for f in [1000,5000,10000]:
    pwm8.freq(f)
    freq = pwm8.freq()
    print("freq:"+str(freq))
    time.sleep(2)
    
pwm8.deinit()

wlan = network.WLAN(network.STA_IF)
wlan.active(True)
sl=wlan.scan()
print(sl)